
#include "stdafx.h"
#include "WicBitmapScaler.h"

CWicBitmapScaler::CWicBitmapScaler()
{
    m_pIWICBitmapScaler = NULL;
}

CWicBitmapScaler::~CWicBitmapScaler()
{
    if(m_pIWICBitmapScaler)
    {
        m_pIWICBitmapScaler->Release();
    }
    m_pIWICBitmapScaler = NULL;
}

CWicBitmapScaler::CWicBitmapScaler(CWicBitmapScaler const & objBitmapScaler)
{
    m_pIWICBitmapScaler = objBitmapScaler.m_pIWICBitmapScaler;
    m_pIWICBitmapScaler->AddRef();
}

CWicBitmapScaler& CWicBitmapScaler::operator=(CWicBitmapScaler const & objBitmapScaler)
{
    if(m_pIWICBitmapScaler)
    {
        m_pIWICBitmapScaler->Release();
    }
    m_pIWICBitmapScaler = objBitmapScaler.m_pIWICBitmapScaler;
    m_pIWICBitmapScaler->AddRef();
    return *this;
}
